package com.springboot.erp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import generator.domain.JshAccountItem;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @TableName jsh_account_head
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class JshAccountHead {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String type;

    private Integer organId;

    private Integer handsPersonId;

    private Integer creator;

    private Float changeAmount;

    private Float discountMoney;

    private Float totalPrice;

    private Integer accountId;

    private String billNo;

    private Date billTime;

    private String remark;

    private String fileName;

    private String status;

    private String source;

    private Integer tenantId;

    private String deleteFlag;

    public JshAccountHead(Integer id, String type, Integer organId, Integer handsPersonId, Integer creator, Float changeAmount, Float discountMoney, Float totalPrice, Integer accountId, String billNo, Date billTime, String remark, String fileName, String status, String source, Integer tenantId, String deleteFlag) {
        this.id = id;
        this.type = type;
        this.organId = organId;
        this.handsPersonId = handsPersonId;
        this.creator = creator;
        this.changeAmount = changeAmount;
        this.discountMoney = discountMoney;
        this.totalPrice = totalPrice;
        this.accountId = accountId;
        this.billNo = billNo;
        this.billTime = billTime;
        this.remark = remark;
        this.fileName = fileName;
        this.status = status;
        this.source = source;
        this.tenantId = tenantId;
        this.deleteFlag = deleteFlag;
    }

//    private String organName;       // 往来单位名称
//    private String handsPersonName; // 财务人员名称
//    private String accountName;     // 收入账户名称
//    private String creatorName;
//    private JshSupplier organ; // 关联的供应商对象
//    private JshPerson handsPerson; // 关联的经手人对象
//    private JshAccount account;


    @TableField(exist = false)
    private List<JshAccountItem> items; // 子表数据


    @TableField(exist = false)
    private String inOutItemName;


}
